<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加轴承信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 20px;
        }
        .container {
            max-width: 600px;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }
        h1 {
            text-align: center;
            color: #333;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        .form-group input[type="text"],
        .form-group input[type="number"],
        .form-group input[type="file"] {
            width: 100%;
            padding: 8px;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        .form-group input[type="submit"] {
            width: 100%;
            padding: 10px;
            background-color: #28a745;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        .form-group input[type="submit"]:hover {
            background-color: #218838;
        }
    </style>
</head>
<body>
<div class="container">
    <h1>添加轴承信息</h1>
    <form action="BearingAddServlet" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label for="bearingType">轴承类型:</label>
            <input type="text" id="bearingType" name="type" required>
        </div>
        <div class="form-group">
            <label for="bearingModel">轴承型号:</label>
            <input type="text" id="bearingModel" name="model" required>
        </div>
        <div class="form-group">
            <label for="standardValue">标准值:</label>
            <input type="number" id="standardValue" name="data" required>
        </div>
        <div class="form-group">
            <label for="predictedLife">预测寿命:</label>
            <input type="text" id="predictedLife" name="life" required>
        </div>
        <div class="form-group">
            <label for="bearingImage">添加图片:</label>
            <input type="file" id="bearingImage" name="imgSrc" accept="image/*" required>
        </div>
        <div class="form-group">
            <input type="submit" value="提交">
        </div>
    </form>
</div>
</body>
</html>